Skip to content

[이나경] Week6#260

Open
nakyoung98 wants to merge 67 commits intocodeit-bootcamp-frontend:part2-이나경from
nakyoung98:part1-이나경-week5

Hidden character warning

The head ref may contain hidden characters: "part1-\uc774\ub098\uacbd-week5"
Open

[이나경] Week6#260
nakyoung98 wants to merge 67 commits intocodeit-bootcamp-frontend:part2-이나경from
nakyoung98:part1-이나경-week5

Conversation

@nakyoung98
Copy link
Copy Markdown
Collaborator

요구사항

기본

  • PC, Tablet, Mobile 디자인에 해당하는 링크 공유 페이지를 만들어 주세요.
  • [] 링크 공유 페이지 url path는 별도로 설정하지 않고, ‘/’에 보이도록 합니다.
  • 카드 컴포넌트는 아래 내용을 고려해 주세요.
  • 링크 공유 페이지에 필요한 Static, no image, Hover 상태만 고려해 만들어 주세요.
  • 별모양 버튼, 케밥(•••) 버튼, Drag 상태는 만들지 않아도 됩니다.
  • 검색바의 기능은 추후 만듭니다.
  • Github에 위클리 미션 PR을 만들어 주세요.
  • React를 사용해 진행합니다.

심화

  • [] 커스텀 hook을 만들어 필요한 곳에 활용해 보세요.

주요 변경사항

  • react library를 페이지 일부에 도입했습니다
  • vite를 도입하였습니다

스크린샷

03-44-02.mp4

드릴 말씀

지난 주에 아파서 지난주 내용을 수행을 못했습니다.
그래서 현재 코드가 조금 비어있을 수 있습니다. 양해부탁드립니다. 빠르게 할 수 있도록 하겠습니다.

withyj-codeit and others added 30 commits September 3, 2023 21:57
랜딩페이지에 필요한 이미지 에셋 추가
메인 페이지 html 파일 추가
기본 여백 등을 초기화하는 reset.css 파일 추가
- action-design.css
- color-design.css
- font=design.css
- image-design.css
- structure.css
- signin.html 페이지 추가
- signup 유도 문자 위치 수정
main -> header
- color-design.css
- font-design.css
- structure.css
다른 html에서도 사용할 수 있도록 일일반화 처리
structure.css -> index-structure.css
index.html 파일 전용 구조 css 파일
- social 로그인 icon
- eye icon
- semantic tag 구분
- action-design.css
- color-design.css
- font-design.css
- image-design.css
- signin-structure.css
- signup과 통용될 수 있도록 클래스 명 수정
…이나경-week2

수요일 23:59분이 지나서 merge 합니다. 
과제 하신다고 고생 많으셨어요 😄
- index.html 클래스 재명명
- base.css, index.css 생성
- reset.css -> normalized css로 변경
- 모든 곳에 공통으로 사용될 utility 파일 작성
- mh_30px 와 같은 margin 요소 중점
- centered 추가
- signin.html
- signin.css
파일 전면 수정
- property 순서 정렬
- 일부 오류 해결 (a href 주소 등)
- BEM 설계기법에 따른 class 명 재설정
- action-design.css
- color-design.css
- font-design.css
- image-design.css
- index-structure.css
- signin-structure.css
- 이미지 경로 변경 및 css 파일 대폭 수정
- base.css 의 *에 margin:0 추가
- mobile 요구사항 적용
- 내부요소의 너비가 기기의 너비가 커지는 많큼 커지지만 400px을 넘지 않음
- 최소 좌우 여백 32px
meta ->L title -> link(css)
- font-style = normal;
- line-height = normal;
- Card.jsx
- Card.css
- useEffect를 사용햔 folder 페이지 데이터 처리
- classNames 도입
: className 관리 라이브러리

- 하위 세부 컴포넌트 정의
: FolderInfo, SerchBar, TableLayout, CardFactory
실제 데이터를 받아 처리하게 끔 처리
- linkUtil 파일 생성
: 링크를 열기 위함
- timeUtil 파일 생성
: 시간을 변환하기 위함
- 실제 데이터를 받을 수 있도록 수정
- 최상위요소 Fragment 로 대체
- classNames로 class 관리
- TableLayout.jsx
- TableLayout.css
- 객체 state에 초기값 배열 넣은 문제 해결
- fetch catch 메소드 추가
datalist 체크 관련 옵셔널 체이닝 추가
- 아직 값을 불러오지 못했을 경우 undefined 대신 "" 출력
데이터 검색 로직  제외 디자인 구현
#main-root 내 margin요소 관련 데이터 추가
react를 적용하지 않은 임시 구현
추후 개선 필요
반응형 크기 구현
- action-button 디자인 추가
- search-bar 반응형 디자인 추가
- hover 시 pointer 표현 및 box-shadow 적용
hover:  이미지 1.3배, 테두리 적용
noimage: 로고 노출
@nakyoung98 nakyoung98 added the 매운맛🔥 뒤는 없습니다. 그냥 필터 없이 말해주세요. 책임은 제가 집니다. label Nov 27, 2023
@nakyoung98 nakyoung98 changed the base branch from part1-이나경 to part2-이나경 November 27, 2023 02:08
Copy link
Copy Markdown
Collaborator

@Aurumsapiens Aurumsapiens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생많으셨습니다! 혹시 다음에는 실 배포 주소를 알려주시면 조금 더 디테일하게 확인이 가능할 듯 합니다! 👍

Comment on lines +11 to +14
<article
className={`card ${classNames(classNameList)}`}
onClick={() => openLinkOnNewTab(url)}
>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

클릭하여 이동을 해야하는 경우에는 보통의 경우 a 태그를 이용하여 href 속성으로 url을 지정해주는 것이 좋습니다. 웹표준을 따름으로써 웹접근성 또한 어느정도 충족시켜줄수 있씁니다~!

}

function CardImage({ src, title }) {
return (
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이런식으로 코드 수정이 이루어진다면 중복 코드의 양을 줄일 수 있을 듯 합니다~!

function CardImage({ src, title }) {
  const source = src ? src : "../../image/folder/logo.svg";
  return <div className="card__image-container">
              <img className="card__image" src={source} alt={title} />
             </div>
}

Comment on lines +19 to +37
fetch(ENDPOINTS.SAMPLE.FOLDER)
.then((response) => response.json())
.then((result) => {
return result.folder;
})
.then((folder) => {
setFolderData({
id: folder.id,
name: folder.name,
owner: folder.owner,
});
return folder.links;
})
.then((links) => {
setLinkData(links);
})
.catch((error) => {
console.error(`데이터 가져오는 중 오류 발생\n${error}`);
});
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aysnc / await 함수로도 한번 구현을 해보는 것을 추천드립니다!

Comment thread src/config/api.js
Comment on lines +1 to +10
const API_BASE_URL = "https://bootcamp-api.codeit.kr/api";

const ENDPOINTS = {
SAMPLE: {
FOLDER: `${API_BASE_URL}/sample/folder`,
USER: `${API_BASE_URL}/sample/user`,
}
};

export default ENDPOINTS; No newline at end of file
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

깔끔하게 API 주소를 잘 정리한듯합니다

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

매운맛🔥 뒤는 없습니다. 그냥 필터 없이 말해주세요. 책임은 제가 집니다.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants